/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ivanbiz.interfaceDAOImpl;


import com.ivanbiz.interfaceDAO.ItemDAO;
import java.util.List;
import org.hibernate.Query;

/**
 *
 * @author Administrator
 */
public class ItemDAOImpl extends GenericDAOImpl implements ItemDAO {

    @Override
    public List searchByLimit(long limit) throws Exception {
        Query query = getSessionFactory().getCurrentSession().createQuery("from com.ivanbiz.model.Item i where i.stock <= '" + limit + "'");
        List list = (List)query.list();
        return list;
    }

    
    
}
